-- [[ SETUP ]] -- -- // tables and variables local http = game:GetService("HttpService") local torso = owner.Character:WaitForChild("Torso") local neck = torso.Neck local rs = torso["Right Shoulder"] local ls = torso["Left Shoulder"] local rh = torso["Right Hip"] local lh = torso["Left Hip"] local rj = owner.Character.HumanoidRootPart.RootJoint -- // rj.C0 = CFrame.new(0, -.25, 5) -- // rj.C1 = CFrame.new(0, 0, 0, 1, -5.58830493e-09, 0, 5.58830493e-09, 1, -0, 0, 0, 1) -- // abd's weird ass offset for _, v in pairs(owner.Character:GetDescendants()) do if v:IsA("Motor6D") then local w = Instance.new("Weld", v) w.Name = "AnimationWeld" w.Part0 = v.Part0 w.Part1 = v.Part1 w.C0 = v.C0 w.C1 = v.C1 w.Enabled = true end end local oldc0s = { ["Head"] = neck.C0, ["Right Arm"] = rs.C0, ["Left Arm"] = ls.C0, ["Right Leg"] = rh.C0, ["Left Leg"] = lh.C0, ["Torso"] = rj.C0 } local parts = { ["Head"] = neck.AnimationWeld, ["Right Arm"] = rs.AnimationWeld, ["Left Arm"] = ls.AnimationWeld, ["Right Leg"] = rh.AnimationWeld, ["Left Leg"] = lh.AnimationWeld, ["Torso"] = rj.AnimationWeld } local function animate(args) local anim local tbl = args.Animation local lerpn = args.Lerp local looping = args.Looping local speed = args.Speed if type(tbl) == "string" then -- // check if the argument is a string or url, then decode it and get table anim = loadstring(http:GetAsync(tbl))() elseif type(tbl) ~= "string" then -- // check if the argument is a table, then set anim to tbl anim = tbl end local start = -1 for i, v in pairs(anim.Keyframes) do local t = start -- // set t to -1 so it checks for 0 local t2 repeat t += 1 t2 = tonumber(tostring(t / 1000)) until anim.Keyframes[t2] if not anim.Keyframes[t2]["HumanoidRootPart"] then return end if not anim.Keyframes[t2].HumanoidRootPart["Torso"] then return end local tt if i == 1 or i == 2 then tt = t2 else local w = tonumber(tostring((math.abs(start - t) / 1000))) tt = (w / 2) / (speed or 1) end start = t local doing = true for k, val in pairs(anim.Keyframes[t2].HumanoidRootPart.Torso) do if k == "CFrame" then coroutine.wrap(function() while doing == true do task.wait() if args["ABD's Shit Offset"] == true then parts.Torso.C0 = parts.Torso.C0:Lerp(CFrame.new(0, -.25, 5) * val, (lerpn or .5)) else parts.Torso.C0 = parts.Torso.C0:Lerp(oldc0s.Torso * val, (lerpn or .5)) end end end)() elseif k ~= "CFrame" then if val["CFrame"] then coroutine.wrap(function() while doing == true do task.wait() parts[k].C0 = parts[k].C0:Lerp(oldc0s[k] * val.CFrame, (lerpn or .5)) end end)() end end end task.wait(tt) doing = false end if looping == false or looping == nil then task.wait(.5) for i, v in pairs(parts) do game:GetService("TweenService"):Create(v, TweenInfo.new(.5), {C0 = oldc0s[i]}):Play() end end end local animation = loadstring(http:GetAsync("https://raw.githubusercontent.com/MechaXYZ/VSBScripts/main/Spy%20Laugh%20Animation%20Module.lua"))() local snd = Instance.new("Sound", owner.Character.Head) snd.SoundId = "rbxassetid://2403731701" snd.Volume = 1.25 snd.Looped = true repeat task.wait() until snd.IsLoaded == true snd:Play() while task.wait() do animate({ ["Animation"] = animation, ["Speed"] = 1, ["Looping"] = true, }) end